using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Data
{
    /// <summary>
    /// Controller class for Orders
    /// </summary>
    public partial class articleController
    {


		
	    /// <summary>
	    /// Inserts a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Insert, true)]
	    public void Insert(
                                        String 
                            ArtID
                            , 
                            String 
                            ArtCateID
                            , 
                            String 
                            Title
                            , 
                            String 
                            ShortDescript
                            , 
                            String 
                            Content
                            , 
                            String 
                            Active
                            , 
                            Int32 
                            Status
                            , 
                            Int32 
                            VipLevel
                            , 
                            Double 
                            Viewed
                            , 
                            String 
                            Image
                            , 
                            String 
                            Author
                            , 
                            String 
                            Hot
                            , 
                            DateTime 
                            CreatedDate
                            , 
                            DateTime 
                            UpdatedDate
            )
	    {		
			article item = new article();
			
			item.ArtID = ArtID;
			item.ArtCateID = ArtCateID;
			item.Title = Title;
			item.ShortDescript = ShortDescript;
			item.Content = Content;
			item.Active = bool.Parse(Active);
			item.Status = Status;
			item.VipLevel = VipLevel;
			item.Viewed = Viewed;
			item.Image = Image;
			item.Author = Author;
			item.Hot = bool.Parse(Hot);
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
		    item.Save("");
	    }

	    /// <summary>
	    /// Updates a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Update, true)]
	    public void Update( String  ArtID,  String  ArtCateID,  String  Title,  String  ShortDescript,  String  Content,  String  Active,  Int32  Status,  Int32  VipLevel,  Double  Viewed,  String  Image,  String  Author,  String  Hot,  DateTime  CreatedDate,  DateTime  UpdatedDate)
		{
			article item = new article();
			
			item.ArtID = ArtID;
			item.ArtCateID = ArtCateID;
			item.Title = Title;
			item.ShortDescript = ShortDescript;
			item.Content = Content;
			item.Active = bool.Parse(Active);
			item.Status = Status;
			item.VipLevel = VipLevel;
			item.Viewed = Viewed;
			item.Image = Image;
			item.Author = Author;
			item.Hot = bool.Parse(Hot);
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
		    item.MarkOld();
		    item.Save("");		
	    }
    }

}
